package com.contain.auth.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Auther: tianchao
 * @Date: 2021/7/3 21:28
 * @Description:
 */
//@RestControllerAdvice
public class Test {
    //@ExceptionHandler({Exception.class})
    public Map<String,String> handler(Exception e){
        System.out.println("异常一新");
        e.printStackTrace();
        Map<String,String > map = new ConcurrentHashMap<>();
        map.put("key","粗错了");
        return map;
    }
}
